package com.wishu.finance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.Data;

/**
 * 房租分期申请
 *
 * @TableName t_jr_rent_installment
 */
@TableName(value = "t_jr_rent_installment")
@Data
public class TJrRentInstallment implements Serializable {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 房租分期申请单号
     */
    private String rentInstallmentOrderNo;

    /**
     * 外部合同号
     */
    private String outOrderNo;

    /**
     * 商户ID
     */
    private String bussinessId;

    /**
     * 部门ID
     */
    private Long deptId;

    /**
     * 部门编号
     */
    private String deptNo;

    /**
     * 出房合同ID
     */
    private Long cfContractId;

    /**
     * 利率
     */
    private BigDecimal rate;

    /**
     * 租客承担比例
     */
    private BigDecimal tenantRate;

    /**
     * 公寓承担比例
     */
    private BigDecimal businessRate;

    /**
     * 借款金额
     */
    private BigDecimal loanAmount;

    /**
     * 借款期限
     */
    private Integer monthLimit;

    /**
     * 一次性服务费
     */
    private Integer serviceFee;

    /**
     * 金融产品ID
     */
    private Long jrProductId;

    /**
     * 应收租金合计
     */
    private String reLeaseCount;

    /**
     * 公寓分期利息合计
     */
    private String inInterestCount;

    /**
     * 服务费
     */
    private Integer serCharge;

    /**
     * 实收分期后租金合计
     */
    private String coHirerentCount;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 审核备注
     */
    private String auditMemo;

    /**
     * 申请状态，1:申请中，2：初审通过，3：初审不通过，4：复审通过，5：复审不通过
     */
    private Integer applyState;

    /**
     * 预留字段1
     */
    private Integer reserve1;

    /**
     * 预留字段2
     */
    private Integer reserve2;

    /**
     * 预留字段3
     */
    private String reserve3;

    /**
     * 预留字段4
     */
    private String reserve4;

    /**
     * 预留字段5
     */
    private String reserve5;

    /**
     * 删除标识 0：未删除，1：删除
     */
    private Integer delFlg;

    /**
     * 创建用户ID
     */
    private Long createUserid;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新用户ID
     */
    private Long updateUserid;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TJrRentInstallment other = (TJrRentInstallment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getRentInstallmentOrderNo() == null ? other.getRentInstallmentOrderNo() == null : this.getRentInstallmentOrderNo().equals(other.getRentInstallmentOrderNo()))
                && (this.getOutOrderNo() == null ? other.getOutOrderNo() == null : this.getOutOrderNo().equals(other.getOutOrderNo()))
                && (this.getBussinessId() == null ? other.getBussinessId() == null : this.getBussinessId().equals(other.getBussinessId()))
                && (this.getDeptId() == null ? other.getDeptId() == null : this.getDeptId().equals(other.getDeptId()))
                && (this.getDeptNo() == null ? other.getDeptNo() == null : this.getDeptNo().equals(other.getDeptNo()))
                && (this.getCfContractId() == null ? other.getCfContractId() == null : this.getCfContractId().equals(other.getCfContractId()))
                && (this.getRate() == null ? other.getRate() == null : this.getRate().equals(other.getRate()))
                && (this.getTenantRate() == null ? other.getTenantRate() == null : this.getTenantRate().equals(other.getTenantRate()))
                && (this.getBusinessRate() == null ? other.getBusinessRate() == null : this.getBusinessRate().equals(other.getBusinessRate()))
                && (this.getLoanAmount() == null ? other.getLoanAmount() == null : this.getLoanAmount().equals(other.getLoanAmount()))
                && (this.getMonthLimit() == null ? other.getMonthLimit() == null : this.getMonthLimit().equals(other.getMonthLimit()))
                && (this.getServiceFee() == null ? other.getServiceFee() == null : this.getServiceFee().equals(other.getServiceFee()))
                && (this.getJrProductId() == null ? other.getJrProductId() == null : this.getJrProductId().equals(other.getJrProductId()))
                && (this.getReLeaseCount() == null ? other.getReLeaseCount() == null : this.getReLeaseCount().equals(other.getReLeaseCount()))
                && (this.getInInterestCount() == null ? other.getInInterestCount() == null : this.getInInterestCount().equals(other.getInInterestCount()))
                && (this.getSerCharge() == null ? other.getSerCharge() == null : this.getSerCharge().equals(other.getSerCharge()))
                && (this.getCoHirerentCount() == null ? other.getCoHirerentCount() == null : this.getCoHirerentCount().equals(other.getCoHirerentCount()))
                && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
                && (this.getAuditMemo() == null ? other.getAuditMemo() == null : this.getAuditMemo().equals(other.getAuditMemo()))
                && (this.getApplyState() == null ? other.getApplyState() == null : this.getApplyState().equals(other.getApplyState()))
                && (this.getReserve1() == null ? other.getReserve1() == null : this.getReserve1().equals(other.getReserve1()))
                && (this.getReserve2() == null ? other.getReserve2() == null : this.getReserve2().equals(other.getReserve2()))
                && (this.getReserve3() == null ? other.getReserve3() == null : this.getReserve3().equals(other.getReserve3()))
                && (this.getReserve4() == null ? other.getReserve4() == null : this.getReserve4().equals(other.getReserve4()))
                && (this.getReserve5() == null ? other.getReserve5() == null : this.getReserve5().equals(other.getReserve5()))
                && (this.getDelFlg() == null ? other.getDelFlg() == null : this.getDelFlg().equals(other.getDelFlg()))
                && (this.getCreateUserid() == null ? other.getCreateUserid() == null : this.getCreateUserid().equals(other.getCreateUserid()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateUserid() == null ? other.getUpdateUserid() == null : this.getUpdateUserid().equals(other.getUpdateUserid()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRentInstallmentOrderNo() == null) ? 0 : getRentInstallmentOrderNo().hashCode());
        result = prime * result + ((getOutOrderNo() == null) ? 0 : getOutOrderNo().hashCode());
        result = prime * result + ((getBussinessId() == null) ? 0 : getBussinessId().hashCode());
        result = prime * result + ((getDeptId() == null) ? 0 : getDeptId().hashCode());
        result = prime * result + ((getDeptNo() == null) ? 0 : getDeptNo().hashCode());
        result = prime * result + ((getCfContractId() == null) ? 0 : getCfContractId().hashCode());
        result = prime * result + ((getRate() == null) ? 0 : getRate().hashCode());
        result = prime * result + ((getTenantRate() == null) ? 0 : getTenantRate().hashCode());
        result = prime * result + ((getBusinessRate() == null) ? 0 : getBusinessRate().hashCode());
        result = prime * result + ((getLoanAmount() == null) ? 0 : getLoanAmount().hashCode());
        result = prime * result + ((getMonthLimit() == null) ? 0 : getMonthLimit().hashCode());
        result = prime * result + ((getServiceFee() == null) ? 0 : getServiceFee().hashCode());
        result = prime * result + ((getJrProductId() == null) ? 0 : getJrProductId().hashCode());
        result = prime * result + ((getReLeaseCount() == null) ? 0 : getReLeaseCount().hashCode());
        result = prime * result + ((getInInterestCount() == null) ? 0 : getInInterestCount().hashCode());
        result = prime * result + ((getSerCharge() == null) ? 0 : getSerCharge().hashCode());
        result = prime * result + ((getCoHirerentCount() == null) ? 0 : getCoHirerentCount().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getAuditMemo() == null) ? 0 : getAuditMemo().hashCode());
        result = prime * result + ((getApplyState() == null) ? 0 : getApplyState().hashCode());
        result = prime * result + ((getReserve1() == null) ? 0 : getReserve1().hashCode());
        result = prime * result + ((getReserve2() == null) ? 0 : getReserve2().hashCode());
        result = prime * result + ((getReserve3() == null) ? 0 : getReserve3().hashCode());
        result = prime * result + ((getReserve4() == null) ? 0 : getReserve4().hashCode());
        result = prime * result + ((getReserve5() == null) ? 0 : getReserve5().hashCode());
        result = prime * result + ((getDelFlg() == null) ? 0 : getDelFlg().hashCode());
        result = prime * result + ((getCreateUserid() == null) ? 0 : getCreateUserid().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUserid() == null) ? 0 : getUpdateUserid().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", rentInstallmentOrderNo=").append(rentInstallmentOrderNo);
        sb.append(", outOrderNo=").append(outOrderNo);
        sb.append(", bussinessId=").append(bussinessId);
        sb.append(", deptId=").append(deptId);
        sb.append(", deptNo=").append(deptNo);
        sb.append(", cfContractId=").append(cfContractId);
        sb.append(", rate=").append(rate);
        sb.append(", tenantRate=").append(tenantRate);
        sb.append(", businessRate=").append(businessRate);
        sb.append(", loanAmount=").append(loanAmount);
        sb.append(", monthLimit=").append(monthLimit);
        sb.append(", serviceFee=").append(serviceFee);
        sb.append(", jrProductId=").append(jrProductId);
        sb.append(", reLeaseCount=").append(reLeaseCount);
        sb.append(", inInterestCount=").append(inInterestCount);
        sb.append(", serCharge=").append(serCharge);
        sb.append(", coHirerentCount=").append(coHirerentCount);
        sb.append(", remarks=").append(remarks);
        sb.append(", auditMemo=").append(auditMemo);
        sb.append(", applyState=").append(applyState);
        sb.append(", reserve1=").append(reserve1);
        sb.append(", reserve2=").append(reserve2);
        sb.append(", reserve3=").append(reserve3);
        sb.append(", reserve4=").append(reserve4);
        sb.append(", reserve5=").append(reserve5);
        sb.append(", delFlg=").append(delFlg);
        sb.append(", createUserid=").append(createUserid);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUserid=").append(updateUserid);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}